<include file="Shared:Header" />
<body class="Bodybg">
<div id="tt" class="easyui-tabs" >
    <div title="本次还款" style="padding: 20px; background-color: #f4f4f4">
        <form id="FF" class="easyui-form" method="post" data-options="novalidate:true">
            <table width="100%" border="0" cellpadding="3" cellspacing="0" class="EditTable">
                <thead>
                <tr>
                    <td colspan="2" style="text-indent:1em;"> 总欠款：{$data.zonge}元，已还：{$data.yihuan}元，剩余：{$data.weihuan}元</td>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td width="120" align="right"> 订单编号：</td>
                    <td>
                        {$orderInfo['OrderSn']}
                    </td>
                    <input id="OrderSn" name="OrderSn" type="hidden" value="{$orderInfo['OrderSn']}" class="required:true,easyui-validatebox" />
                </tr>
                <tr class="isHidden">
                    <td width="120" align="right"><span class="Red">*</span> 还款金额：</td>
                    <td>
                        <input id="Money" name="Money" type="number" class="required:true,easyui-validatebox" />
                    </td>
                </tr>
                <tr class="isHidden">
                    <td align="right">还款类型：</td>
                    <td>
                        <select id="PayType" name="PayType">
                            <option value="1">支付宝</option>
                            <option value="2">微信</option>
                            <option value="3">银联</option>
                            <option value="4">代付</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="right">是否销账：</td>
                    <td class="isInput">
                        是 <input type="radio" id="" name="Type" value="2" checked="checked">
                        否 <input type="radio" id="" name="Type" value="1" checked="checked">
                    </td>
                </tr>
                <tr class="isHidden">
                    <td width="120" align="right"><span class="Red">*</span> 还款账户：</td>
                    <td>
                        <input id="Accounts" name="Accounts" type="text" class="required:true,easyui-validatebox" />
                    </td>
                </tr>
                <tr>
                    <td width="120" align="right"><span class="Red">*</span> 备注信息：</td>
                    <td>
                        <textarea id="TradeRemark" name="TradeRemark" style="width:400px;height:100px;"></textarea>
                    </td>
                </tr>
                </tbody>
            </table>
            <input type="hidden" id="UserID" name="UserID" value="{$orderInfo['UserID']}"/>
        </form>
    </div>
    <div title="还款记录"  style="padding: 20px; background-color: #f4f4f4">
        <div  class="TabelContent">
            <table id="CallBill"></table>
        </div>
    </div>
</div>
<!--通讯记录-->
<script type="text/javascript">
    $(function () {
        var frozenColumns = [
            // { field: '', title:'序号', checkbox: true }
        ];
        var columns = [
            { field: 'OrderSn', title: '订单编号', width: 130 },
            { field: 'TotalMoney', title: '还款金额', width: 90 },
            { field: 'Accounts', title: '还款账户', width: 160 },
            { field: 'PayType', title: '还款类型', width: 60 },
            { field: 'HkTime', title: '还款时间', width: 130 },
            { field: 'TradeRemark', title: '备注信息', width: 100 },
        ];
        $.XB.datagrid({
            "loadsuccess": function () {
                $(this).datagrid('resize', {
                    height: 290
                });
            }, "frozenColumns": frozenColumns, "columns": columns, "url": "__APP__/Loans/Yuqilist/getRepaymentList", "u": "UID={$orderInfo['UserID']}&OID={$orderInfo['OrderSn']}", "pagesize": "10", "datalist": "#CallBill"
        });
    });
</script>
</body>
<include file="Shared:Footer" />
<script type="text/javascript">
    function bigview(obj,num) {
        var imsArr=<?php echo json_encode($cardimgArr);?>;
        $(".docs-pictures" , parent.parent.parent.document).remove();
        $(".viewer-container" , parent.parent.parent.document).remove();
        var ulHtml='';
        ulHtml+='<ul style="display: none" class="docs-pictures">';
        for(var i=0;i<imsArr.length;i++){
            ulHtml+='<li style="float:left;padding-left:20px;cursor: pointer"><img src="'+imsArr[i]+'" data-original="'+imsArr[i]+'"></li>'
        }
        ulHtml+='<div class="clear"></div></ul>';
        if($("body" , parent.parent.parent.document).append(ulHtml)){
//                    var num=$(obj).attr('data-num');
            window.parent.parent.parent.bigPopup(num);
        }else{
            $.XB.warning({'message':"请刷新后重试"});
        }
    }

    $('input[name="Btn"]').click(function () {
        $(".docs-pictures" , parent.parent.parent.document).remove();
        $(".viewer-container" , parent.parent.parent.document).remove();
    });
</script>
